package com.ewo.service.impl.ApplicationPage;

import com.ewo.entity.ApplicationPage.Notice;
import com.ewo.mapper.NoticeMapper;
import com.ewo.service.ApplicationPage.NoticeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {
    @Resource
    NoticeMapper noticeMapper;
    //查找所有公告信息
    public List<Notice> findAllNotice(){
        return noticeMapper.findAllNotice();
    }
    //更新公告已阅读信息
    public int updateNoticeById(long id){
        return noticeMapper.updateNoticeById(id);
    }

    //根据id获取当前正文
    public Notice findNoticeById(long id){
        return noticeMapper.findNoticeById(id);
    }
}
